<template>
  <div class="app-container">
    <div class="ul_list01">
      <el-row>
        <el-col :span="8" v-for="(points, index) in userShopList" :key="index" >
          <el-card :body-style="{ padding: '0px' }" style="width: 250px;height: 200px;margin-bottom: 20px">
            <img style="width: 250px;height: 130px"  src="" v-if="points.coverFiles.length < 1"  alt="">
            <img style="width: 250px;height: 130px" :src="points.coverFiles[0].url" v-else  alt="">
            <div style="padding: 6px;font-size: 12px">
              <span>{{ points.name }}</span>
              <div class="bottom clearfix">
                <div class="describes" >
                <span class="data">
                  <el-popover
                    placement="top-start"
                    trigger="hover"
                    width="400"
                    :disabled="points.describes.length < 17"
                    effect="dark"
                    :content="points.describes"
                  >
                  <span slot="reference">
                    {{ points.describes.length > 17 ? points.describes.substring(0, 17) + "..." : points.describes }}
                  </span>
                  </el-popover>
                </span>
                </div>
              </div>
            </div>
          </el-card>
        </el-col>
      </el-row>
    </div>
    <div class="page">
      <pagination style="padding: 0 0"
        v-show="total>0"
        :total="total"
        :page-sizes="[6, 12, 24,48]"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </div>
  </div>
</template>

<script>
import {userPointsList,userInfo} from "@/api/resources/common.js";

export default {
  name: "profile",
  data() {
    return {
      // 表单参数
      form: {},
      // 显示搜索条件
      showSearch: true,
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 6,
      },
      userShopList:[],
      userInfo:{}
    };
  },
  created() {
    this.getList()
  },
  methods: {
    /** 查询参数列表 */
    getList() {
      this.loading = true;
      userPointsList(this.addDateRange(this.queryParams)).then(res=>{
        this.userShopList = res.rows
        this.total = res.total;
      })
    },
  }
};
</script>
<style>
.page {
  text-align: right;
  font-size: 12px;
  overflow: hidden;
}
.data{
  margin-top: 6px;
  font-size: 13px;
  display: inline-block;
  color: #999;
}
</style>
